import { connect } from 'react-redux'
import SearchDetail from '../../../views/Detail/SearchDetail'

function mapStateToProps(state: any) {
    return {
        categoryThirdList: state.detail.categoryThirdList,
        categoryThirdIndex: state.detail.categoryThirdIndex,
    }
}

function mapDispatchToProps(dispatch: (obj: any) => void) {
    return {
        'SET_DETAIL_CATEGORYTHIRDLIST': (data: any, status: number) => {
            dispatch({ type: 'SET_DETAIL_CATEGORYTHIRDLIST', data, status})
        },
        'SET_DETAIL_CATEGORYTHIRDINDEX': (data: any, status: number) => {
            dispatch({ type: 'SET_DETAIL_CATEGORYTHIRDINDEX', data, status})
        },
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(SearchDetail)